/*
 Navicat Premium Data Transfer

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 50711
 Source Host           : localhost:3306
 Source Schema         : student

 Target Server Type    : MySQL
 Target Server Version : 50711
 File Encoding         : 65001

 Date: 20/03/2023 08:49:25
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ap
-- ----------------------------
DROP TABLE IF EXISTS `ap`;
CREATE TABLE `ap` (
  `category_id` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `score` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `desc` varchar(255) DEFAULT NULL,
  `course_student_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of ap
-- ----------------------------
BEGIN;
INSERT INTO `ap` (`category_id`, `id`, `student_id`, `course_id`, `teacher_id`, `score`, `created_at`, `desc`, `course_student_id`) VALUES (1, 1, 12, 2, 4, '40', '2023-03-18 12:42:44', NULL, NULL);
INSERT INTO `ap` (`category_id`, `id`, `student_id`, `course_id`, `teacher_id`, `score`, `created_at`, `desc`, `course_student_id`) VALUES (2, 2, 12, 1, 5, '40', '2023-03-18 13:21:09', '', NULL);
COMMIT;

-- ----------------------------
-- Table structure for calendar
-- ----------------------------
DROP TABLE IF EXISTS `calendar`;
CREATE TABLE `calendar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `content` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of calendar
-- ----------------------------
BEGIN;
INSERT INTO `calendar` (`id`, `name`, `content`, `created_at`) VALUES (1, '21', '21', '2023-03-13 10:16:38');
COMMIT;

-- ----------------------------
-- Table structure for class
-- ----------------------------
DROP TABLE IF EXISTS `class`;
CREATE TABLE `class` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `school_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of class
-- ----------------------------
BEGIN;
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (1, '软件3班', '2023-02-26 12:08:06', 2);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (2, '人文1班', '2023-03-07 17:23:18', 3);
COMMIT;

-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_name` varchar(255) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course
-- ----------------------------
BEGIN;
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (1, '计算机技术与科学', 2, '2023-02-26 12:17:21');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (2, '马克思主义', 1, '2023-03-05 09:48:03');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (3, '11', 1, '2023-03-13 10:11:50');
COMMIT;

-- ----------------------------
-- Table structure for course_student
-- ----------------------------
DROP TABLE IF EXISTS `course_student`;
CREATE TABLE `course_student` (
  `teacher_id` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_start_id` int(11) DEFAULT NULL,
  `student_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course_student
-- ----------------------------
BEGIN;
INSERT INTO `course_student` (`teacher_id`, `id`, `course_start_id`, `student_id`, `created_at`, `category_id`, `course_id`) VALUES (5, 1, 5, 12, '2023-03-18 11:40:33', 2, 1);
INSERT INTO `course_student` (`teacher_id`, `id`, `course_start_id`, `student_id`, `created_at`, `category_id`, `course_id`) VALUES (5, 3, 5, 14, '2023-03-18 12:02:32', 2, 1);
INSERT INTO `course_student` (`teacher_id`, `id`, `course_start_id`, `student_id`, `created_at`, `category_id`, `course_id`) VALUES (4, 4, 4, 14, '2023-03-18 12:11:09', 1, 2);
INSERT INTO `course_student` (`teacher_id`, `id`, `course_start_id`, `student_id`, `created_at`, `category_id`, `course_id`) VALUES (4, 5, 4, 12, '2023-03-18 12:21:36', 1, 2);
COMMIT;

-- ----------------------------
-- Table structure for course_teacher
-- ----------------------------
DROP TABLE IF EXISTS `course_teacher`;
CREATE TABLE `course_teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `total` int(11) DEFAULT NULL COMMENT '总人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course_teacher
-- ----------------------------
BEGIN;
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (4, 1, 2, 4, '2023-03-07 18:46:49', 2);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (5, 2, 1, 5, '2023-03-07 18:47:08', 19);
COMMIT;

-- ----------------------------
-- Table structure for day
-- ----------------------------
DROP TABLE IF EXISTS `day`;
CREATE TABLE `day` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `score` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of day
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for exam
-- ----------------------------
DROP TABLE IF EXISTS `exam`;
CREATE TABLE `exam` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `created_at` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of exam
-- ----------------------------
BEGIN;
INSERT INTO `exam` (`id`, `count`, `teacher_id`, `address`, `course_id`, `created_at`) VALUES (1, 100, 4, '21', 1, '2023-03-13 10:28:24');
COMMIT;

-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
  `name` varchar(255) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of notice
-- ----------------------------
BEGIN;
INSERT INTO `notice` (`name`, `id`, `content`, `created_at`) VALUES ('11', 1, '11', '2023-03-13 10:09:47');
INSERT INTO `notice` (`name`, `id`, `content`, `created_at`) VALUES ('11', 2, '11', '2023-03-13 10:09:55');
INSERT INTO `notice` (`name`, `id`, `content`, `created_at`) VALUES ('11', 3, '11', '2023-03-13 10:11:31');
COMMIT;

-- ----------------------------
-- Table structure for school
-- ----------------------------
DROP TABLE IF EXISTS `school`;
CREATE TABLE `school` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `school_name` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of school
-- ----------------------------
BEGIN;
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (2, '软件学院', '2023-02-26 12:18:12');
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (3, '人文学院', '2023-03-07 17:18:25');
COMMIT;

-- ----------------------------
-- Table structure for score
-- ----------------------------
DROP TABLE IF EXISTS `score`;
CREATE TABLE `score` (
  `category_id` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `score1` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `score2` varchar(255) DEFAULT NULL,
  `score3` varchar(255) DEFAULT NULL,
  `score4` varchar(255) DEFAULT NULL,
  `desc` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of score
-- ----------------------------
BEGIN;
INSERT INTO `score` (`category_id`, `id`, `student_id`, `course_id`, `teacher_id`, `score1`, `created_at`, `score2`, `score3`, `score4`, `desc`) VALUES (1, 1, 12, 2, 4, '40', '2023-03-18 12:42:44', '60', NULL, NULL, NULL);
INSERT INTO `score` (`category_id`, `id`, `student_id`, `course_id`, `teacher_id`, `score1`, `created_at`, `score2`, `score3`, `score4`, `desc`) VALUES (2, 2, 12, 1, 5, '40', '2023-03-18 13:21:09', '40', NULL, NULL, '');
COMMIT;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) DEFAULT NULL,
  `student_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  `school_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  `sex` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 DEFAULT '123456',
  `status` int(11) DEFAULT '0',
  `type` varchar(255) DEFAULT 'student',
  `birthday` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of student
-- ----------------------------
BEGIN;
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (12, 2001, '李同学', 2, 1, '2023-03-07 18:29:31.938980', '男', '123456', 1, 'student', NULL, NULL, NULL, NULL);
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (13, 2002, '斯同学', 3, 2, '2023-03-07 18:44:46.000000', '男', '123456', 0, 'student', NULL, NULL, NULL, NULL);
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (14, 2003, '王同学', 2, 1, '2023-03-18 11:51:00.293232', '男', '123456', 1, 'student', NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) DEFAULT NULL,
  `teacher_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  `school_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `password` varchar(255) DEFAULT '123456',
  `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  `type` varchar(255) DEFAULT 'teacher',
  `sex` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `birthday` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of teacher
-- ----------------------------
BEGIN;
INSERT INTO `teacher` (`id`, `number`, `teacher_name`, `school_id`, `class_id`, `course_id`, `password`, `created_at`, `type`, `sex`, `birthday`, `age`, `email`, `phone`) VALUES (4, 1001, '王老师', 2, 1, NULL, '123456', '2023-03-07 18:24:06.000000', 'teacher', '男', NULL, NULL, NULL, NULL);
INSERT INTO `teacher` (`id`, `number`, `teacher_name`, `school_id`, `class_id`, `course_id`, `password`, `created_at`, `type`, `sex`, `birthday`, `age`, `email`, `phone`) VALUES (5, 1002, '张老师', 3, NULL, NULL, '123456', '2023-03-07 18:44:11.000000', 'teacher', '女', NULL, NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
